package com.cg.mapper;

import com.cg.dto.AiAnswerDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Delete;

import java.util.List;

@Mapper
public interface AiAnswerMapper {
    int insert(AiAnswerDTO dto);

    List<AiAnswerDTO> listByUser(@Param("userId") Long userId, @Param("limit") Integer limit);

    @Delete("DELETE FROM ai_answer WHERE user_id = #{userId}")
    int deleteByUser(@Param("userId") Long userId);
}

